package sort;

import java.util.Arrays;

public class BubbleSort {
    public static void main(String[] args) {
        int [] s = {9,6,8,1,7,3,4};
        for (int i = 0; i < s.length-1; i++) {

            for (int j = 1+i; j <s.length-1-i ; j++) {
                if (s[i]>s[j]){
                    int a;
                    a = s[i] ;
                    s[i] = s[j] ;
                    s[j] = a ;
                }
            }
        }
        System.out.println(Arrays.toString(s));
    }
}
